@extends('admin.layout')
@section('title',$title)
@section('content')
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                品牌列表
                <small>advanced</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i>品牌列表 </a></li>
                <li><a href="#">Tables</a></li>
                <li class="active">

                </li>
            </ol>
        </section>
        @if (session('success'))
            <div class="alert alert-success alert-dismissable">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                <h4><i class="icon fa fa-ban"></i> 成功!</h4>
                <li>{{ session('success') }}</li>
            </div>
        @endif
        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="box">
                        <div class="box-header">
                            {{--分页--}}

                            <div class="col-md-3 col-md-offset-7">
                            <div class="input-group input-group-sm">


                            </div>
                        </div>
                        </div><!-- /.box-header -->
                        <h3><i class="fa fa-plus"></i><a href="/admin/brand/add">品牌添加</a></h3>
                        <div class="box-body">
                            <table id="example2" class="table table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>品牌名称</th>
                                    <th>类别</th>
                                    <th>品牌LOGO</th>
                                    <th>状态</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($data as $brand)

                                <tr>
                                    <td>{{ $brand -> id }}</td>
                                    <td>{{ $brand -> brandname }}</td>
                                    <td>{{ $brand -> catename}}</td>
                                    <td><img src="{{ $brand -> brandlogo }}" height="30" width="90"></td>
                                    @if($brand -> status == 0)
                                    <td><a class="btn bg-olive margin">显示</a></td>
                                    @else
                                        <td><a class="btn bg-orange margin">不显示</a></td>
                                    @endif
                                    <td><a href="/admin/brand/edit/{{ $brand -> id }}" class="btn bg-olive margin"><i class="fa fa-edit"></i></a> <a href="/admin/brand/delete/{{ $brand -> id }}" class="btn bg-maroon margin"><i class="fa fa-trash-o"></i></a></td>
                                </tr>
                                @endforeach
                                </tfoot>
                            </table>
                        </div><!-- /.box-body -->
                    </div><!-- /.box -->
                    {!! $data->render() !!}

                </div><!-- /.col -->
            </div><!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->
@endsection
